/*
 *  Copyright (C) 2010 Glauco
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.balisunrise.swing.components.util;

import java.awt.Component;
import java.awt.Container;
import java.awt.FocusTraversalPolicy;

/**
 * Interface para escutar a mudança de Focus.
 * Utilizado pelo FocusManager.
 * 
 * @author Glauco
 * @see org.balisunrise.swing.components.util.FocusManager
 */
public interface FocusTraversalListener {

    /**
     * Quando Focus passe de um componente para outro dentro de um mesmo
     * Container o FocusManager dispara esse evento desta interface.
     *
     * @param activeContainer Container ativo.
     * @param ftp FocusTraversalPolicy do Container.
     * @param oldComponent Componente onde o Focus se encontrava.
     * @param newComponent Componente para onde o Focus Foi.
     * @param lastComponet Último Componente do Container.
     */
    public void checkFocusTraversal(Container activeContainer,
            FocusTraversalPolicy ftp, Component oldComponent,
            Component newComponent, Component lastComponet);
}
